package com.tensquare.spit.dao;

import com.tensquare.spit.pojo.Spit;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @program: tensquare_parent
 * @description: 吐槽数据访问层
 * @author: 廖俊杰
 * @date: 2021/8/20 10:52
 **/
public interface SpitDao extends MongoRepository<Spit,String> {

    /**
     *  根据上级id查询吐槽列表（分页)
     * @param parentId
     * @param pageable
     * @return
     */
    Page<Spit> findByParentid(String parentId, Pageable pageable);
}
